<!DOCTYPE html>
<html>

<head>
    <meta charset=utf-8>
</head>

<body>
    <!-- 
        请补全JavaScript代码，要求根据参数动态生成"li"标签页码并插入"ul"标签下。要求如下：
        1. "allItem"为总数据项个数，"pageItem"为每页的数据项个数
        2. "li"标签内容为当前页码数，页码从1开始
        输入:_createPage(13,2)
        输出："li"长度为7，"li"内容依次为"1","2","3","4","5","6","7"

     -->
    <ul id="ul">

    </ul>
    <script type="text/javascript">
        const _createPage = (allItem, pageItem) => {
            // 补全代码
            let len = Math.ceil(allItem / pageItem)
            let str = ''
            for (let i = 0; i < len; i++) {
                str += `<li>${i + 1}</<li>`
            }
            document.querySelector('#ul').innerHTML = str
        }
        _createPage(13, 2)
    </script>
</body>

</html>